package cn.madis.controller;

import cn.madis.domain.User;
import cn.madis.feign.OrderFeign;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class OrderController {
        private OrderFeign orderFeign;

        @RequestMapping("/order/{id}")
        public User getById(@PathVariable Long id){
            return orderFeign.getById(id);
        }
}
